use openmls::framing::errors::MlsMessageError;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum InfraError {
    #[error("mls msg: {0}")]
    MlsMsg(#[from] MlsMessageError),

    #[error("db: {0}")]
    Db(#[from] aspect_db_types::errors::Error),

    #[error("db/common: {0}")]
    DbCommon(#[from] aspect_db_common::errors::Error),

    #[error("llmq: {0}")]
    LlmqDb(#[from] aspect_db_llmq::DbError),

    #[error("not yet implemented")]
    Unimplemented,

    #[error("{0}")]
    Other(String),
}
